package com.atguigu.gmall.order;

import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Administrator
 * @create 2020-05-28 9:49
 */
@FeignClient("service-order")
public interface OrderFeignClient {

    //生成订单号
    @GetMapping("/api/order/auth/tradeNo")
    public String tradeNo();

    //对外暴露订单对象
    @GetMapping("/api/order/getOrderInfo/{orderId}")
    public OrderInfo getOrderInfo(@PathVariable(name = "orderId") Long orderId);
}
